#ifndef     __HANDLER_TASK_H
#define     __HANDLER_TASK_H

#include "../rtos/thread.h"
#include "../rtos/message_queue.h"
#include "../conn/frame.h"
#include "../pub_task/task_info.h"

namespace cargo_task {

class HandlerTask : public rtos::Thread<HandlerTask, 2048, osPriorityHigh1> {

public:
    void init_start();

    void run();

    void post(const conn::Frame &frame) {
        m_mq.post(frame);
    }

    TaskInfo task_info;

private:
    rtos::lazy::MessageQueue<conn::Frame, 10> m_mq;
};

extern HandlerTask handlerTask;

}


#endif
